<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <div class="breadcrumb_wrap">
        <ul class="breadcrumb">
            <li>您的位置：</li>
            <li> <a href="#">类型管理</a> <span class="divider">></span> </li>
            <li> <a href="#">类型管理</a> <span class="divider">></span> </li>
            <li class="active">列表</li>
        </ul>
    </div>
    <div class="button_box table_btn_box">
        <button type="button" class="btn btn-primary btn_add" ng-click="addTypeOne()"><i class="glyphicon glyphicon-plus"></i>新增</button>
    </div>
    <div class="table-responsive con_list tyle_list">
        <table class="table table-striped">
            <thead>
            <tr>
                <th>名称</th>
                <th>图片显示</th>
                <th>价格/元</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody ng-repeat="type in typeOneList" style="border:none">
                <tr >
                    <td>{{type.title}} <i class="glyphicon glyphicon-triangle-bottom" ng-click="openSecond(type.id)"></i></td>
                    <td ><img  width="36" height="36" style=" background:#61d068; padding:5px;" ng-src="/dapi/download/getImageIO?imgUrl={{type.iconUrl}}" /></td>
                    <td></td>
                    <td class="ops">
                        <button  type="button" class="btn btn-primary"  ng-click="updateTypeOne(type)">修改</button>
                        <button ng-disabled="type.id=='jpyj'||type.id=='promotion'" type="button" class="btn btn-primary del" ng-click="deleteTypeOne(type.id)">删除</button>
                        <button type="button" ng-click="addGTypeFun(type.id)" class="btn btn-primary editor">添加材质</button>
                    </td>
                </tr>
                <tr ng-if="secondID==type.id">
                    <td colspan=4 class="sub_type second">
                        <table class="table table-striped">
                            <tbody ng-repeat="typeTwo in type.typeList" style="border:none">
                            <tr>
                                <td>{{typeTwo.typeName}} <i class="glyphicon glyphicon-triangle-bottom" ng-click="openThird(typeTwo.id)"></i></td>
                                <td><img ng-src="/dapi/download/getImageIO?imgUrl={{typeTwo.iconUrl}}" width="36" height="36"></td>
                                <td>{{typeTwo.price}}</td>
                                <td class="ops">
                                    <button type="button" ng-click="updateGTypeFun(typeTwo)" class="btn btn-primary editor">修改</button>
                                    <button type="button" class="btn btn-primary" ng-click="enableGtypeFun(typeTwo)">删除</button>
                                    <button type="button" ng-click="addGStyle(typeTwo.id)" class="btn btn-primary editor">添加样式</button>
                                </td>
                            </tr>
                            <tr ng-if="thirdID==typeTwo.id">
                                <td colspan=4 class="sub_type third">
                                    <table class="table table-striped">

                                        <tbody ng-repeat="gstyle in typeTwo.styleList" style="border:none">
                                            <tr >
                                                <td>{{gstyle.typeName}}<i class="glyphicon glyphicon-triangle-bottom" ng-click="openFourth(gstyle.id)"></i></td>
                                                <td></td>
                                                <td></td>
                                                <td class="ops">
                                                    <button type="button" ng-click="updateGStyle(gstyle)" class="btn btn-primary editor">修改</button>
                                                    <button type="button" ng-click="deleteGStyle(gstyle.id)" class="btn btn-primary del" >删除</button>
                                                    <button type="button" ng-click="addPinX(gstyle.id)" class="btn btn-primary editor" >添加品型</button>
                                                </td>
                                            </tr>
                                            <tr ng-if="fourthID==gstyle.id">
                                                <td colspan=4 class="sub_type forth">
                                                    <table class="table table-striped">
                                                        <tbody ng-repeat="px in gstyle.pList" style="border:none">
                                                            <tr>
                                                                <td>{{px.title}}</td>
                                                                <td></td>
                                                                <td></td>
                                                                <td class="ops"><button ng-click="updatePX(px)" type="button" class="btn btn-primary editor">修改</button>
                                                                    <button ng-click="deletePX(px.id)" type="button" class="btn btn-primary del" >删除</button></td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="page_wrap">
        <div class="text-center scott">
            <uib-pagination  total-items="totalItems" ng-model="currentPage" boundary-links="true" max-size="5"   ng-change="pageChanged()" items-per-page="itemsPerPage" previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
        </div>
    </div>
</div>